<?php namespace App\Http\Requests;

use App\Http\Requests\Request;

class InvestLogRequest extends Request {

	/**
	 * Determine if the user is authorized to make this request.
	 *
	 * @return bool
	 */
	public function authorize()
	{
		return true;
	}

    public function attributes()
    {
        return [
            'user_id'           =>  '用户标识',
            'org_id'            =>  '投资机构标识',
            'project_id'        =>  '投资项目标识',
            'money_num'         =>  '金额',
            'money_type'        =>  '货币类型',
            'money_desc'        =>  '金额描述',
            'stock_num'         =>  '占有股权',
            'org_name'          =>  '投资机构名字',
            'investor_name'     =>  '投资人名字',
            'invest_account'    =>  '投资金额',
        ];
    }

	/**
	 * Get the validation rules that apply to the request.
	 *
	 * @return array
	 */
	public function rules()
	{
		return [
            'user_id'           =>  'alpha_num',
            'org_id'            =>  'alpha_num',
            'project_id'        =>  'required|alpha_num',
            'money_num'         =>  'numeric|min:0',
            'money_type'        =>  'alpha_dash',
            'money_desc'        =>  'alpha',
            'stock_num'         =>  'numeric|max:100',
            'org_name'          =>  '',
            'investor_name'     =>  '',
            'invest_account'    =>  'numeric|min:0',
		];
	}



}
